<include file="__THEME__/header" />
<link href="../Public/css/space.css" rel="stylesheet" type="text/css" />
<div class="contents lbg B">
  <!-- 左边信息 begin-->
  	<include file="../Public/home_left" />
  <!-- 中间信息 begin-->
  <div class="contents_min w787">
   <h3 class="tit_h3">{:L('nav_skill')}</h3>
    <p class="f12 cl03 mb10 pl5"><img class="alM pr5" src="../Public/images/title_icon_17.gif" />{:L('skill_info')}</p>
    <div class="list_cate_nav">
      <div class="tab">
        <ul>
          <volist id="vo" name="topmenu">
            <php>$class=($type==$key)?'class="sam_status on"':''</php>
            <li {$class}>
              <span><a href="{$vo.url}" >{$vo.info}</a></span>{:$_GET['act']}
            </li>
          </volist>
        </ul>
      </div>
    </div>
    <div class="C"></div>
    <div class="base_input">
      <div class="setupTag">
        <p class="f14 cl03">{:L('skill_add_info')}</p>
        <div class="setupTag_box">
          <div class="setupTag_boxL">
            <div>
              <input type="text" value="" maxlength="10" id="tagname" class="setupTag_txt">
             <input type="button" value="{:L('skill_add_tag')}" onclick="addSpaceTag()" name="" class="btn_sea"/></div>
          </div>
          <div class="setupTag_boxR">
            <p class="cl06 pb5">{:L('skill_add_may_like')} ：</p>
            <div id="rec_tags" class="setupTag_list01">
            	<volist id="vo" name="commendlist">
            		<a href="javascript:void(0)" id="commendlist_{$vo.tagid}" onclick="doaddone({$vo.tagid},'{$vo.tagname}')" title="{:L('skill_add_tag')}"><em>+</em>{$vo.tagname}</a>
			    </volist>
			</div>
          </div>
        </div>
        <div class="setupTag_tit">{:L('skill_have_added')}：</div>
        <div class="setupTag_list02">
          <ul class="tagList" id="tag_list">
          	<volist id="vo" name="list">
            <li onmouseout="this.className='';" onmouseover="this.className='bg';" id="tag_{$vo.tagid}" rel="tags">
              <a class="a1" href="#">{$vo.tagname}</a><a class="a2" href="javascript:void(0)" onclick="del_tag({$vo.tagid})" ><img src="../Public/images/transparent_03.gif" title="{:L('skill_del_tag')}" /></a>
			</li>
			</volist>
          </ul>
          <div class="C"></div>
        </div>
        <div class="setupTag_tit">{:L('skill_about')}：</div>
        <div class="setupTag_txtList pb20">
          <p>·{:L('skill_about_1')}</p>
          <p>·{:L('skill_about_2')}</p>
          <p>·{:L('skill_about_3')}</p>
          <p>·{:L('skill_about_4')}</p>
        </div>
      </div>
      <div class="C"></div>
    </div>
  </div>
  <!--中间信息 begin-->
  <div class="C"></div>
</div>
<script>
$(document).ready(function(){
/**	$("li[rel='tags']").live("mouseover", function(){
		 $(this).addClass("spanhover");
	});	
	$("li[rel='tags']").live("mouseout", function(){
		 $(this).removeClass("spanhover");
	});		 **/
});


	//新输入添加
	function addSpaceTag(){
		$.post('__APP__&mod=Info&act=doskill',{type:'add',tagname:$('#tagname').val()},function(txt){
			if(txt>0){
				insertHtml(txt,$('#tagname').val());
			}else if(txt=='-1'){
				$.tbox.no('{:L("skill_add_no_tag")}','{:L("do_failure")}');
			}else{
				$.tbox.no('{:L("skill_you_have_add")}','{:L("do_failure")}');
			}
		});
	}
	
	function doaddone(tagId,tagName){
		$.post('__APP__&mod=Info&act=doskill',{type:'addone',tagId:tagId},function(txt){
			if(txt>0){
				insertHtml(tagId,tagName);
				$("#commendlist_"+tagId).remove();
			}else if(txt=='-1'){
				$.tbox.no('{:L("skill_add_no_tag")}','{:L("do_failure")}');
			}else{
				$.tbox.no('{:L("skill_you_have_add")}','{:L("do_failure")}');
			}
		});
	}
	
	//添加Node
	function insertHtml(tagId,tagname){
		$('#tag_list').append('<li id="tag_'+tagId+'" onmouseout="this.className=\'\';" onmouseover="this.className=\'bg\';" rel="tags"><a class="a1" href="#">'+tagname+'</a><a href="javascript:void(0)" class="a2" onclick="del_tag('+tagId+')" title={:L("skill_delete")}><img src="../Public/images/transparent_03.gif" title={:L("skill_delete")}></a></li>');
		$('#tagname').val('');
	}

	function del_tag(tagId){
		$.post('__APP__&mod=Info&act=doskill',{type:'del',tagid:tagId},function(txt){
			if(txt){
				$("#tag_"+tagId).html('<font color=red>{:L("skill_del_success")}</font>');
				$("#tag_"+tagId).fadeTo(1000, 0.25, function(){
					$("#tag_"+tagId).remove();
				 });				
			}else{
				$.tbox.no('{:L("skill_del_failure")}','{:L("do_failure")}');
			}
		});
	}
</script>
<include file="__THEME__/footer" />